package com.hsylient.elasticsearch.repository;

import com.hsylient.elasticsearch.entity.User;
import org.springframework.data.domain.Limit;
import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface UserRepository extends ElasticsearchRepository<User, String> {


    // 可以定义自己的查询方法
    List<User> findByName(String name);

    List<User> findByName(String name, Sort sort, Limit limit);


}
